from django.db import models

# Create your models here.

# class front(models.Model):
#     id = models.BigAutoField(primary_key=True)
#     # 如果想要使用可以为null的BooleanFieid，则使用NullBooleanField
#     # removed = models.BooleanField(null=True)
#     removed = models.NullBooleanField()
#     # 如果超过254个字符，建议使用textfield
#     text = models.TextField()
#
# class Book(models.Model):
#     id = models.BigAutoField(primary_key=True)
#
#     def __str__(self):
#         return "<(Author:id:%s,create_time:%s)>"%(
#
#         )
#
#     class Meta:
#         db_table = 'book_modle1'
#         ordering = ['pub_date']

# class Category(models.Model):
#     name = models.CharField(max_length=100)
#
#     class Meta:
#         db_table = 'category'


# class Article(models.Model):
#     title = models.CharField(max_length=200)
#     content = models.TextField()
#     cateogry = models.ForeignKey("Category",on_delete=models.CASCADE,null=True,related_query_name='articles')
#
#     create_time = models.DateTimeField(auto_now_add=True,null=True)
#
#     # def __str__(self):
#     #     return "<Article(id:%s,title:%s)" %(self.pk,self.title)
#
#     class Meta:
#         db_table = 'article'